package hczc.longcai.com.hccrowdfunding.home.fourth_mine.activities;

import android.content.Intent;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.TextView;

import hczc.longcai.com.hccrowdfunding.R;
import hczc.longcai.com.hccrowdfunding.activity.BaseActivity;

public class MineWalletActivity extends BaseActivity implements View.OnClickListener {

    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_mine_wallet);

        initViews();
    }

    private void initViews() {
        findViewById(R.id.head_back).setOnClickListener(this);
        ((TextView) findViewById(R.id.head_title)).setText("我的钱包");

        findViewById(R.id.mine_wallet_tabs_ljsy).setOnClickListener(this);
        findViewById(R.id.mine_wallet_tabs_zjmx).setOnClickListener(this);
        findViewById(R.id.mine_wallet_tabs_dyq).setOnClickListener(this);
        findViewById(R.id.mine_wallet_tabs_hb).setOnClickListener(this);

        findViewById(R.id.footer_mywallet_chongzhi).setOnClickListener(this);
        findViewById(R.id.footer_mywallet_tixian).setOnClickListener(this);
    }

    @Override
    public void onClick(View v) {
        int id = v.getId();
        switch (id){
            case R.id.head_back:
                finish();
                break;
            case R.id.mine_wallet_tabs_ljsy:
                startActivity(new Intent(MineWalletActivity.this,AddIncomeActivity.class));
                break;
            case R.id.mine_wallet_tabs_zjmx:
                startActivity(new Intent(MineWalletActivity.this,FundDetailActivity.class));
                break;
            case R.id.mine_wallet_tabs_dyq:
                startActivity(new Intent(MineWalletActivity.this,VoucherActivity.class));
                break;
            case R.id.mine_wallet_tabs_hb:
                startActivity(new Intent(MineWalletActivity.this,RedPacketActivity.class));
                break;

            case R.id.footer_mywallet_chongzhi:
                startActivity(new Intent(MineWalletActivity.this,RechargeActivity.class));
                break;
            case R.id.footer_mywallet_tixian:
                startActivity(new Intent(MineWalletActivity.this,WithDrawActivity.class));
                break;
        }
    }
}
